#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QThread>

#include "CWorker.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private:

    void createAboutThread();

    void sendSignalToSetDisplayWidgetMode();

private slots:

    void timeOutCallback();

    void on_horizontalSlider_obsSize_valueChanged(int value);

    void on_spinBox_obsSize_valueChanged(int arg1);

    void on_comboBox_currentIndexChanged(int index);

    void on_pushButton_clearResult_clicked();

    void on_pushButton_resetMap_clicked();

    void on_pushButton_startPlan_clicked();

public slots:
    void slotUpdateGridMapSize(quint16 height, quint16 width);

signals:

    void signalInitDisplayWidgetMode(int mouse_event, int obstacle_size);

    void signalClearDisplayWidgetResult();
    void signalResetDisplayWidgetMap();

    void signalStartPlanning();

private:
    Ui::Widget *ui;


    QTimer * m_timer = nullptr;

    QThread * m_thread = nullptr;
    CWorker * m_worker = nullptr;
};
#endif // WIDGET_H
